import request from '@/utils/request'

const operLogApi = process.env.VUE_APP_SYS_API + '/operateLog'

/**
 * 分页查询系统日志列表
 * @param params
 * @returns {AxiosPromise}
 */
export const pageOperLog = (params) => {
  return request({
    url: `${operLogApi}`,
    method: 'GET',
    params
  })
}


/**
 * 根据id查询系统日志信息
 * @param id 系统日志id
 * @returns {AxiosPromise}
 */
export const getOperLog = (id) => {
  return request({
    url: `${operLogApi}/${id}`,
    method: 'GET'
  })
}


/**
 * 根据ID删除系统日志
 * @param ids 系统日志ids
 * @returns {AxiosPromise}
 */
export const delOperLog = (ids) => {
  return request({
    url: `${operLogApi}/${ids}`,
    method: 'DELETE'
  })
}

/**
 * 根据ID删除系统日志
 * @returns {AxiosPromise}
 */
export const cleanOperLog = () => {
  return request({
    url: `${operLogApi}/clean`,
    method: 'DELETE'
  })
}
